package com.fhz.day005.fragment;

import androidx.annotation.NonNull;
import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;

import com.fhz.day005.model.FoodModel;
import com.fhz.day005.repostroy.FoodRepostroy;

/**
 * 时间:2022/5/23
 *
 * @author msfeng
 * 简述: TODO
 */
public class FoodViewModelFactory implements ViewModelProvider.Factory {


    @NonNull
    @Override
    public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {
        return (T) new FoodViewModel(new FoodRepostroy(new FoodModel()));
    }
}

